﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CrossGenLogic
{
    public class GridElement
    {
        private bool ishorizontal;
        private int x, y;
        private int length;

        public GridElement(int x, int y, bool ishorizontal, int length)
        {
            this.x = x;
            this.y = y;
            this.ishorizontal = ishorizontal;
            this.length = length;
        }

        public int X
        {
            get
            {
                return x;
            }
        }

        public int Y
        {
            get
            {
                return y;
            }
        }

        public int Length
        {
            get
            {
                return length;
            }
        }

        public int dx()
        {
            if (ishorizontal) return 1;
            else return 0;
        }

        public int dy()
        {
            if (!ishorizontal) return 1;
            else return 0;
        }

    }
}
